package com.jsoft.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @author:sha
 * @email:o68o4741@163.com
 * @date:2023/2/18
 */
public class TransferMessage implements Serializable {
    private static final long serialVersionUID = 3327141230448166005L;
    private Integer id;
    private String enterprise;
    private String socialUniformCode;
    private String institution;
    private Double amountMoney;
    private Date openTime;
    private Date expiryTime;
    private String paymentInterestType;
    private String  remark;

    public TransferMessage() {
    }

    public TransferMessage(String enterprise, String socialUniformCode, String institution, Double amountMoney, Date openTime, Date expiryTime, String paymentInterestType, String remark) {
        this.enterprise = enterprise;
        this.socialUniformCode = socialUniformCode;
        this.institution = institution;
        this.amountMoney = amountMoney;
        this.openTime = openTime;
        this.expiryTime = expiryTime;
        this.paymentInterestType = paymentInterestType;
        this.remark = remark;
    }

    public TransferMessage(Integer id, String enterprise, String socialUniformCode, String institution, Double amountMoney, Date openTime, Date expiryTime, String paymentInterestType, String remark) {
        this.id = id;
        this.enterprise = enterprise;
        this.socialUniformCode = socialUniformCode;
        this.institution = institution;
        this.amountMoney = amountMoney;
        this.openTime = openTime;
        this.expiryTime = expiryTime;
        this.paymentInterestType = paymentInterestType;
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "TransferMessage{" +
                "id=" + id +
                ", enterprise='" + enterprise + '\'' +
                ", socialUniformCode='" + socialUniformCode + '\'' +
                ", institution='" + institution + '\'' +
                ", amountMoney=" + amountMoney +
                ", openTime=" + openTime +
                ", expiryTime=" + expiryTime +
                ", paymentInterestType='" + paymentInterestType + '\'' +
                ", remark='" + remark + '\'' +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getEnterprise() {
        return enterprise;
    }

    public void setEnterprise(String enterprise) {
        this.enterprise = enterprise;
    }

    public String getSocialUniformCode() {
        return socialUniformCode;
    }

    public void setSocialUniformCode(String socialUniformCode) {
        this.socialUniformCode = socialUniformCode;
    }

    public String getInstitution() {
        return institution;
    }

    public void setInstitution(String institution) {
        this.institution = institution;
    }

    public Double getAmountMoney() {
        return amountMoney;
    }

    public void setAmountMoney(Double amountMoney) {
        this.amountMoney = amountMoney;
    }

    public Date getOpenTime() {
        return openTime;
    }

    public void setOpenTime(Date openTime) {
        this.openTime = openTime;
    }

    public Date getExpiryTime() {
        return expiryTime;
    }

    public void setExpiryTime(Date expiryTime) {
        this.expiryTime = expiryTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getPaymentInterestType() {
        return paymentInterestType;
    }

    public void setPaymentInterestType(String paymentInterestType) {
        if (Objects.equals(paymentInterestType, "A")) {
            this.paymentInterestType = "融资方付息";
        } else if (Objects.equals(paymentInterestType, "B")) {
            this.paymentInterestType = "核心企业付息";
        }
    }
}
